<?php require_once('init.php'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Silesia Racing Time Battle</title>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 <meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="table_sorter/style_blue.css" />
<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>  
<script type="text/javascript" src="js/jquery.betterTooltip.js"></script>  
<script type="text/javascript" src="js/jquery-latest.js"></script> 
<script type="text/javascript" src="js/jquery.tablesorter.js"></script>
<script>
$(document).ready(function() 
    { 
        $("#myTable").tablesorter(); 
    } 
); 

    
</script>
</head>
<body>
    <div id="wrapper">
        <div id="headerwrap">
        <div id="header">
           <p align="right"> Silesia Racing Time Battle EVOLution</p>
        </div>
        </div>
		<div id="topwrap">
        <div id="top_home">		
           <h2>Time Battle - View Drivers</h2>
        </div>
        </div>
        <div id="leftcolumnwrap">
        <div id="leftcolumn">
            <?php include_once ('menu_left.php');?>
        </div>
        </div>
        <div id="contentwrap">
        <div id="content">
		<div>   
		<p></p>
		


<?php
if (isset($_POST['submit'])) {
	require_once('init.php');
	$password = $_POST['password'];
	if (Auth::login($password)) {
		$dont_show_form = true;
		echo '<p>Zalogowano pomyślnie</p>';
	} else {
		echo '<p>Niepoprawne dane logowania!</p>';
	} // if auth login
	
} // isset post submit

if (!isset($dont_show_form)) { ?>
<form action="login_form.php" method="post">
	<p>Zaloguj się aby uzyskać dostęp do wybranej funkcjonalności</p>
	<p>Podaj hasło: <input type="password" name="password" /></p>
	<p><input type="submit" name="submit" value="Zaloguj" /></p>
</form>
<? } // isset dont_show_form ?>
</div>
        </div>
        </div>
        <div id="rightcolumnwrap">
        <div id="rightcolumn">
			<?php include_once ('right_column.php');?>
			<p></p>
        </div>
        </div>
        <div id="footerwrap">
        <div id="footer">
            <p>Silesia Racing Time Battle</p>
        </div>
        </div>
    </div>
</body>
</html>
